#app {
  .main-container {
    min-height: 100%;
    transition: margin-left 0.28s;
    margin-left: $sideBarWidth;
    position: relative;
    // min-width: 1200px;
  }

  .sidebar-container {
    transition: width 0.28s;
    width: $sideBarWidth !important;
    background-color: $--sidebar-menu-background-color;
    height: 100%;
    position: fixed;
    font-size: 0px;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;

    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out,
        0s padding-right ease-in-out;
    }

    .el-submenu > .el-submenu__title {
      margin-bottom: 11px;
    }

    .el-submenu > .el-submenu__title > .el-submenu__icon-arrow {
      right: 30px !important;
    }

    .el-menu .el-submenu__title {
      padding-left: 6px !important;
      
    } 

    .el-menu-item,
    .el-submenu__title {
      line-height: 35px !important;
      height: 35px !important;
    }

    .nest-menu .el-submenu__title {
      padding: 0 20px 0 36px !important;

    }

    

    .scrollbar-wrapper {
      overflow-x: hidden !important;
    }

    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }

    .el-scrollbar {
      height: 100%;
    }

    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 10px);
      }
    }

    .is-horizontal {
      display: none;
    }

    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }

    .svg-icon {
      margin-right: 15px;
    }

    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }

    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
    }

    .el-submenu .el-menu {
      &::after {
        position: absolute;
        top: 0;
        left: 28px;
        width: 2px;
        // height: 100%;
        height: calc(100% - 0.25rem);
        background: $--sidebar-line-color;
      }
    }

    .el-submenu .el-menu-item {
      padding-right: 0;
      // padding-left: 46px !important;
      // margin-left: 32px;
      // margin-right: 32px;
    }

    // menu hover
    .submenu-title-noDropdown {
      margin-bottom: 11px;
      padding-left: 20px !important;
    }

    .el-menu-item.submenu-title-noDropdown {
      margin-left: 6px;
      margin-right: 20px;
      padding: 0px 14px !important;
    }

    .submenu-title-noDropdown,
    .el-submenu__title {
      &:hover {
        background-color: $menuHover !important;
      }
    }

    .is-active {
      &.submenu-title-noDropdown {
        color: $--sidebar-active-color !important;
      }

      & > .el-submenu__title,
      .svg-icon {
        color: $--sidebar-active-color !important;
      }
    }

    .el-submenu .el-menu-item {
      padding-left: 15px !important;
    }

    // & .nest-menu .el-submenu > .el-submenu__title,
    .el-menu-item.submenu-title-noDropdown,
    & .el-submenu .el-menu-item {
      // min-width: 100% !important;
      background-color: $--sidebar-menu-background-color !important;
      border-radius: 8px;

      &.is-active {
        background-color: $--sidebar-active-menu-background-color !important;

        &:hover {
          background-color: $--sidebar-active-menu-background-color !important;
        }
      }

      &:hover {
        background-color: $--sidebar-active-menu-background-color !important;
      }
    }

    .submenu-item-container {
      border-radius: 8px;
      padding: 0 14px;

      &:hover {
        background-color: $--sidebar-active-menu-background-color !important;
      }
    }
  }

  .hideSidebar {
    .sidebar-container {
      width: 54px !important;
    }

    .main-container {
      margin-left: 54px;
    }

    .submenu-title-noDropdown {
      padding: 0 !important;
      position: relative;

      .el-tooltip {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

        .sub-el-icon {
          margin-left: 19px;
        }
      }
    }

    .el-submenu {
      overflow: hidden;

      & > .el-submenu__title {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

        .sub-el-icon {
          margin-left: 19px;
        }

        .el-submenu__icon-arrow {
          display: none;
        }
      }

      .el-menu {
      }
    }

    .el-menu--collapse {
      .el-submenu {
        & > .el-submenu__title {
          & > span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }

      .submenu-item-container {
        padding: 0;
      }
    }
  }

  .el-menu--collapse .el-menu .el-submenu {
    min-width: $sideBarWidth !important;
  }

  // mobile responsive
  .mobile {
    .main-container {
      margin-left: 0px;
    }

    .sidebar-container {
      transition: transform 0.28s;
      width: $sideBarWidth !important;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$sideBarWidth, 0, 0);
      }
    }
  }

  .withoutAnimation {
    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}

// when menu collapsed
.el-menu--vertical {
  & > .el-menu {
    .svg-icon {
      margin-right: 16px;
    }

    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }
  }

  .nest-menu .el-submenu > .el-submenu__title,
  .el-menu-item {
    &:hover {
      // you can use $subMenuHover
      background-color: $menuHover !important;
    }
  }

  .nest-menu .el-submenu__title {
    padding-left: 0 !important;

    .el-submenu__icon-arrow {
      right: 0 !important;
    }

    .nest-menu a {
      padding-left: 12px;
      padding-right: 0;
    }
  }

  // the scroll bar appears when the subMenu is too long
  > .el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;

    &::-webkit-scrollbar-track-piece {
      background: #d3dce6;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #99a9bf;
      border-radius: 20px;
    }
  }
}

.router-link-exact-active {
  display: flex;

  // :before {
  //   position: absolute;
  //   box-sizing: border-box;
  //   content: '';
  //   top: 0.5rem;
  //   bottom: 0.5rem;
  //   left: 0;
  //   right: auto;
  //   // border-left: 2px solid #2C7BE5;
  //   border-bottom: 0;
  // }
}

.el-menu.el-menu--inline .nest-menu a{
  padding: 0 20px 0 36px !important;
}

.popover-menu__container {
  padding: 0 !important;
  // border: 1px solid #d8d8d8;
  box-shadow: 0 0.6125rem 2.5rem 0.6125rem rgb(140 152 164 / 18%);
  transform: translateX(14px);
  border-radius: 6px;

  .popover-header {
    font-weight: bold;
    padding: 15px 20px 10px 25px;
    border-bottom: 1px solid rgba(51, 60, 79, 0.1);
  }

  .popover-menu {
    // padding: 10px 0px;
    position: relative;

    .popover-link-active {
      color: $--sidebar-active-color;
    }

    // .popover-highlighter {
    //   position: absolute;
    //   display: none;
    //   transition: all 0.3s;
    //   left: -1px;
    //   height: 38px;
    //   width: 2px;
    //   top: 0px;
    //   background: $--sidebar-active-color;

    //   &.block {
    //     display: block;
    //   }
    // }

    li {
      padding: 10px 0;
      cursor: pointer;

      &:not(:last-child) {
        margin-bottom: 5px;
      }

      border-left: 3px solid transparent;

      &.highlight {
        border-color: $--sidebar-active-color;
      }

      &:hover {
        color: $--sidebar-active-color;
        background: $--sidebar-active-menu-background-color;

        // .popover-highlighter {
        //   display: block;
        // }
      }
    }

    .menu-name {
      margin-left: 20px;
    }
  }
}
